ExitUnion

PackageAxial
Represents the final outcome of a workflow execution.

Specification

Kind
Union
Members
10
Examples
0
mapSignature
Exit.map mapper exit
bindSignature
Exit.bind binder exit
mapErrorSignature
Exit.mapError mapper exit
mapBothSignature
Exit.mapBoth onSuccess onFailure exit
fromResultSignature
Exit.fromResult result

Summary

NameSignatureSynopsis
Union cases
IsFailurethis.IsFailureNo description available.
IsSuccessthis.IsSuccessNo description available.
SuccessSuccess 'valueThe workflow completed successfully.
FailureFailure Cause<'error>The workflow failed due to a specific cause.
Operations
mapExit.map mapper exitTransforms the success value of an exit outcome using the provided function.
bindExit.bind binder exitBinds the success value of an exit outcome to a function that returns a new exit outcome.
mapErrorExit.mapError mapper exitTransforms the error value of a failed exit outcome using the provided function.
mapBothExit.mapBoth onSuccess onFailure exitTransforms both success and failure outcomes of an exit using the provided functions.
fromResultExit.fromResult resultCreates an exit outcome from a standard F# Result.
toResultExit.toResult exitConverts an exit outcome to a standard F# Result.

Union cases

kind:member

IsFailure

this.IsFailure
Member

Returns

bool
kind:member

IsSuccess

this.IsSuccess
Member

Returns

bool
kind:member

Success

Success 'value
Member
The workflow completed successfully.

Parameters

NameTypeDescription
Item'value

Returns

unit
kind:member

Failure

Failure Cause<'error>
Member
The workflow failed due to a specific cause.

Parameters

NameTypeDescription
ItemCause<'error>

Returns

unit

Operations

kind:member

map

Exit.map mapper exit
Member
Transforms the success value of an exit outcome using the provided function.

Parameters

NameTypeDescription
mapper'v -> 'wThe function to transform the success value.
exitExit<'v, 'e>The exit outcome to transform.

Returns

Exit<'w, 'e>
kind:member

bind

Exit.bind binder exit
Member
Binds the success value of an exit outcome to a function that returns a new exit outcome.

Parameters

NameTypeDescription
binder'v -> Exit<'w, 'e>The function that takes a success value and returns a new exit outcome.
exitExit<'v, 'e>The exit outcome to bind.

Returns

Exit<'w, 'e>
kind:member

mapError

Exit.mapError mapper exit
Member
Transforms the error value of a failed exit outcome using the provided function.

Parameters

NameTypeDescription
mapper'e -> 'fThe function to transform the error value.
exitExit<'v, 'e>The exit outcome to transform.

Returns

Exit<'v, 'f>
kind:member

mapBoth

Exit.mapBoth onSuccess onFailure exit
Member
Transforms both success and failure outcomes of an exit using the provided functions.

Parameters

NameTypeDescription
onSuccess'v -> 'wThe function to transform the success value.
onFailureCause<'e> -> Cause<'f>The function to transform the failure cause.
exitExit<'v, 'e>The exit outcome to transform.

Returns

Exit<'w, 'f>
kind:member

fromResult

Exit.fromResult result
Member
Creates an exit outcome from a standard F# Result.

Parameters

NameTypeDescription
resultResult<'v, 'e>The result to convert.

Returns

Exit<'v, 'e>
kind:member

toResult

Exit.toResult exit
Member
Converts an exit outcome to a standard F# Result.

Parameters

NameTypeDescription
exitExit<'v, 'e>The exit outcome to convert.

Returns

Result<'v, 'e>